package v10

func SingleFieldValidate() {
	v := _validate
	var err error

	var b bool
	var b1 string
	err = v.Var(b, "boolean")
	err = v.Var(b1, "boolean")
	outRes("boolean", err)

	var i = 100
	err = v.Var(i, "number")
	err = v.Var(i, "boolean")
	outRes("boolean", err)

	var str = "abcdefg123"
	err = v.Var(str, "alpha")
	outRes("alpha", err)

	var slice = []int{1}
	err = v.Var(slice, "max=15,min=2")
	outRes("slice", err)

	var mp = make(map[int]int)
	mp[1] = 1
	mp[2] = 2
	mp[3] = 3
	err = v.Var(mp, "max=15,min=2")
	outRes("map", err)

	var timeStr = "2006-01-02 15:04:05"
	err = v.Var(timeStr, "datetime=2006-01-02 15:04:05")
	outRes("datetime", err)

	s1 := "abc"
	s2 := "abc1"
	err = v.VarWithValue(s1, s2, "eqfield")
	outRes("eqfield", err)
}
